package leetcode;

/**
 * @program: datastructureandalogorithm
 * @description:
 * @author: hmx
 * @create: 2022-01-02 10:31
 **/
public class LeetCode2124 {

    public boolean checkString(String s) {
        for (int i = 0; i < s.length() - 1; i++) {
            int num1 = s.charAt(i) - 'a';
            int num2 = s.charAt(i + 1) - 'a';
            if (num1 > num2) {
                return false;
            }
        }

        return true;
    }

}
